﻿using YawetagDemo.Framework.Data;

namespace YawetagDemo.Console.Models
{
    public class PersonModel
    {
        public PersonModel(IPerson entity)
        {
            Name = entity.Name;
            DOB = entity.DOB.HasValue ? entity.DOB.Value.ToShortDateString() : "Unknown";
            Age = entity.Age.HasValue ? entity.Age.Value.ToString() : "Unknown";
        }

        public string Name { get; private set; }
        public string DOB { get; private set; }
        public string Age { get; private set; }
    }
}
